package com.twq.types.abstracttype

/**
 * Created by tangweiqun on 2017/12/6.
 */
class Food

abstract class Animal {
  type SuitableFood <: Food

  def eat(food: SuitableFood)
}

class Grass extends Food

class Cow extends Animal {
  type SuitableFood = Grass

  override def eat(food: Grass) = {}
}

object AbstractTypeTest {
  def main(args: Array[String]): Unit = {

  }
}